<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
         var  toupians=['images/1.jpg','images/2.jpg','images/3.jpg','images/4.jpg','images/5.jpg',
         'images/6.jpg','images/7.jpg', 'images/8.jpg','images/9.jpg','images/10.jpg'];
  
       for( let i=0;i<toupians.length;i++){
           
      let   toupian=  document.createElement("img");
     
      toupian.src= toupians[i];
      toupian.width=250;
      toupian.height=250;
   document.body.appendChild(toupian);
      toupian.onclick=function(){
          document.body.removeChild(toupian);
      } 
   
  }
   
       </script>

    
</body>
</html>